﻿/*using UnityEngine;
using System.Collections;

public class AButton : MonoBehaviour {
	
	public GameObject myPlayer;
	
	// Use this for initialization
	void Start () {
		myPlayer = GameObject.FindGameObjectWithTag("Player");
	}
	
	// Update is called once per frame
	void Update () {
		
		//is there a touch on screen?
		if(Input.touches.Length <= 0)
		{
			//if no touches then execute this code
		}
		else //if there is a touch
		{
			//loop through all the touches on screen
			for(int i=0; i<Input.touchCount; i++)
			{
				//executes this code for current touch(i) on screen
				if(this.guiTexture.HitTest(Input.GetTouch(i).position))
				{
					//if current touch hits our object, run this code
					if(Input.GetTouch(i).phase == TouchPhase.Began)
					{
						myPlayer.GetComponent<PlayerController>().jumpUp = true;
					}
					if(Input.GetTouch(i).phase == TouchPhase.Stationary)
					{
						myPlayer.GetComponent<PlayerController>().jumpUp = false;
					}
					if(Input.GetTouch(i).phase == TouchPhase.Ended)
					{
						myPlayer.GetComponent<PlayerController>().jumpUp = false;
					}
				}
			}
		}
		
	}
}*/
